<?php
/**
 * @Author: Marte
 * @Date:   2017-08-21 15:53:18
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-21 17:33:10
 */

?>
<div class="novel author">
    <span class="novel_title">全部小说
    <?php if(isset($_GET['searchresult1'])&&$_GET['searchresult1']==1)
    {
        echo '<a href="admin_index.php?type=5" title="">返回</a>';
    }
    ?><span>共有<?php echo $_num;?>个签约作者</span></span>
    <form action="search_author.php" method="post" accept-charset="utf-8">
    <input class="search" type="text" name="search" >
    <input class="submit" type="submit" name="submit" value="搜索">
    </form>
    <table>

        <thead>
            <tr>
                    <th class="penname">笔名</th>
                    <th class="truename">真实名字</th>
                     <th class="status">状态</th>
                    <th class="works">作品数</th>
                    <th class="words">总字数</th>
                    <th class="days">创作天数</th>
                    <th class="time">注册时间</th>
                    <th class="rank">等级</th>
                    <th class="dell">加入黑名单</th>

            </tr>
        </thead>
        <tbody>
        <?php
                    if(!isset($_GET['searchresult1'])||$_GET['searchresult1']!=1)
                    {

                ?>
        <?php
            while ($_assoc=$_resultt4->fetch_assoc()) {


        ?>
            <tr>
                <td><?php
                        if($_assoc['penname']=='')
                        {
                            echo '未填写';

                        }else{
                            echo $_assoc['penname'];
                        }
                ?>

                </td>
                <td><?php
                        if($_assoc['truename']=='')
                        {
                            echo '未填写';

                        }else{
                            echo $_assoc['truename'];
                        }
                ?></td>
                <td>
                    <?php
                        switch($_assoc['status'])
                        {
                            case 1:echo '已签约';break;
                            case 2:echo '未签约';break;

                        }
                    ?>
                </td>
                <td><?php
                        if($_assoc['totalwords']=='')
                        {
                            echo '0';

                        }else{
                            echo $_assoc['totalworks'];
                        }
                ?></td>
                <td><?php
                        if($_assoc['totalwords']=='')
                        {
                            echo '0';

                        }else{
                            echo $_assoc['totalwords'];
                        }
                ?>万字</td>
                <td><?php
                        if($_assoc['days']=='')
                        {
                            echo '0';

                        }else{
                            echo $_assoc['days'];
                        }
                ?>天</td>
                <td><?php
                        if($_assoc['regtime']=='')
                        {
                            echo '未填写';

                        }else{
                            echo $_assoc['regtime'];
                        }
                ?></td>
                <td><?php
                        if($_assoc['rank']=='')
                        {
                            echo '新手';

                        }else{
                            echo $_assoc['rank'];
                        }
                ?></td>
                <td><a href="admin_index.php?type=5&delete=1&id=<?php echo $_assoc['id'];?>" title="">标记</a></td>
            </tr>
            <?php
                    }
                ?>
        <?php
                         }else
                            {
                                $_sql10='select * from author where id="'.$_GET['id'].'"';
                                $_result10=$_mysql->query($_sql10);
                                $_assoc10=$_result10->fetch_assoc();
                    ?>
                      <tr>
                        <td>
                            <?php
                        if($_assoc10['penname']=='')
                        {
                            echo '未填写';

                        }else{
                            echo $_assoc10['penname'];
                        }
                ?>


                        </td>
                        <td>
                            <?php
                        if($_assoc10['truename']=='')
                        {
                            echo '未填写';

                        }else{
                            echo $_assoc10['truename'];
                        }
                ?>

                        </td>
                        <td> <?php
                        switch($_assoc10['status'])
                        {
                            case 1:echo '已签约';break;
                            case 2:echo '未签约';break;

                        }
                    ?>
</td>

                         <td><?php
                        if($_assoc10['totalwords']=='')
                        {
                            echo '0';

                        }else{
                            echo $_assoc10['totalworks'];
                        }
                ?></td>
                <td><?php
                        if($_assoc10['totalwords']=='')
                        {
                            echo '0';

                        }else{
                            echo $_assoc10['totalwords'];
                        }
                ?>万字</td>
                <td><?php
                        if($_assoc10['days']=='')
                        {
                            echo '0';

                        }else{
                            echo $_assoc10['days'];
                        }
                ?>天</td>
                <td><?php
                        if($_assoc10['regtime']=='')
                        {
                            echo '未填写';

                        }else{
                            echo $_assoc10['regtime'];
                        }
                ?></td>
                <td><?php
                        if($_assoc10['rank']=='')
                        {
                            echo '新手';

                        }else{
                            echo $_assoc10['rank'];
                        }
                ?></td>
                <td><a href="admin_index.php?type=5&delete=1&id=<?php echo $_assoc10['id'];?>" title="">标记</a></td> </tr>


                        <?php

                            }
                            ?>
        </tbody>
    </table>
    <div class="num2">
              <?php
                for($i=0;$i<$_pagesnum3;$i++)
                {
                  echo '<a href="admin_index.php?type=5&page3='.($i+1).'">'.($i+1).'</a>';
                }
                echo '<a href="admin_index.php?type=5&page3='.($_page3+1).'" >></a>';
            ?>
            </div>
</div>
